class CreateDepartments < ActiveRecord::Migration
  def self.up
    create_table :departments do |t|
      t.string      :number                     #部门编号
      t.string      :name                       #部门名称
      t.integer     :manager_id                 #部门主管
      t.timestamps
    end
    Department.create(:number => '0100',:name => 'MPA教育中心')
    Department.create(:number => '0200',:name => '保卫处')
    Department.create(:number => '0201',:name => '保卫处浮山校区办公室')
    Department.create(:number => '0202',:name => '保卫处消防科')
    Department.create(:number => '0203',:name => '保卫处校卫队')
    Department.create(:number => '0204',:name => '保卫处政治保卫科')
    Department.create(:number => '0205',:name => '保卫处治安科')
    Department.create(:number => '0300',:name => '材料科学与工程研究院')
    Department.create(:number => '0301',:name => '材料科学与工程研究院材料科学与工程系')
    Department.create(:number => '0400',:name => '财务处')
    Department.create(:number => '0401',:name => '财务处财务处基建财务管理科')
    Department.create(:number => '0402',:name => '财务处综合管理科')
    Department.create(:number => '0500',:name => '出版社')
    Department.create(:number => '0600',:name => '船舶中心')
    Department.create(:number => '0601',:name => '船舶中心东方红船')
    Department.create(:number => '0602',:name => '船舶中心天使号船')
    Department.create(:number => '0700',:name => '党委统战部')
    Department.create(:number => '0800',:name => '党委校长办公室')
    Department.create(:number => '0801',:name => '党委校长办公室党委校长办公室')
    Department.create(:number => '0802',:name => '党委校长办公室法律顾问室')
    Department.create(:number => '0900',:name => '党委宣传部')
    Department.create(:number => '0901',:name => '党委宣传部机关党委')
    Department.create(:number => '1000',:name => '党委组织部')
    Department.create(:number => '1001',:name => '党委组织部党校办公室')
    Department.create(:number => '1100',:name => '档案馆')
    Department.create(:number => '1200',:name => '法政学院')
    Department.create(:number => '1201',:name => '法政学院法律系')
    Department.create(:number => '1202',:name => '法政学院公共管理系')
    Department.create(:number => '1203',:name => '法政学院海洋法学研究所')
    Department.create(:number => '1204',:name => '法政学院政治学与行政学系')
    Department.create(:number => '1300',:name => '浮山校区工作委员会')
    Department.create(:number => '1400',:name => '高等教育研究与评估中心、本科教学工作水平评估办公室')
    Department.create(:number => '1500',:name => '高等职业技术学院')
    Department.create(:number => '1600',:name => '高新技术产业处')
    Department.create(:number => '1700',:name => '工程学院')
    Department.create(:number => '1701',:name => '工程学院海洋工程系')
    Department.create(:number => '1702',:name => '工程学院机电工程系')
    Department.create(:number => '1703',:name => '工程学院土木工程系')
    Department.create(:number => '1704',:name => '工程学院自动化及测控系')
    Department.create(:number => '1800',:name => '工会、妇委会、计生办')
    Department.create(:number => '1900',:name => '管理学院')
    Department.create(:number => '1901',:name => '管理学院工商管理系')
    Department.create(:number => '1902',:name => '管理学院会计学系')
    Department.create(:number => '1903',:name => '管理学院旅游学系')
    Department.create(:number => '1904',:name => '管理学院营销与电子商务系')
    Department.create(:number => '2000',:name => '规划建设处')
    Department.create(:number => '2100',:name => '国际合作与交流处')
    Department.create(:number => '2200',:name => '国际教育交流中心')
    Department.create(:number => '2300',:name => '国际教育学院')
    Department.create(:number => '2400',:name => '国家实验室海大筹建办')
    Department.create(:number => '2500',:name => '海洋地球科学学院')
    Department.create(:number => '2501',:name => '海洋地球科学学院地球科学系')
    Department.create(:number => '2502',:name => '海洋地球科学学院地球探测与信息技术系')
    Department.create(:number => '2503',:name => '海洋地球科学学院河口海岸带研究所')
    Department.create(:number => '2600',:name => '海洋发展研究院')
    Department.create(:number => '2700',:name => '海洋环境学院')
    Department.create(:number => '2701',:name => '海洋环境学院海洋气象学系')
    Department.create(:number => '2702',:name => '海洋环境学院海洋学系')
    Department.create(:number => '2703',:name => '海洋环境学院物理海洋教育部重点实验室')
    Department.create(:number => '2704',:name => '海洋环境学院物理海洋研究所')
    Department.create(:number => '2800',:name => '海洋监测与检测中心')
    Department.create(:number => '2900',:name => '海洋生命学院')
    Department.create(:number => '2901',:name => '海洋生命学院海洋生态系')
    Department.create(:number => '2902',:name => '海洋生命学院海洋生物工程系')
    Department.create(:number => '2903',:name => '海洋生命学院海洋生物系')
    Department.create(:number => '3000',:name => '后勤工作办公室')
    Department.create(:number => '3001',:name => '后勤工作办公室房产办公室')
    Department.create(:number => '3100',:name => '后勤集团')
    Department.create(:number => '3101',:name => '后勤集团车队')
    Department.create(:number => '3102',:name => '后勤集团动力服务中心')
    Department.create(:number => '3103',:name => '后勤集团接待服务中心')
    Department.create(:number => '3104',:name => '后勤集团企业发展中心')
    Department.create(:number => '3105',:name => '后勤集团物业中心')
    Department.create(:number => '3106',:name => '后勤集团校医院')
    Department.create(:number => '3107',:name => '后勤集团修建工程中心')
    Department.create(:number => '3108',:name => '后勤集团学生社区服务中心')
    Department.create(:number => '3109',:name => '后勤集团饮食服务中心')
    Department.create(:number => '3110',:name => '后勤集团幼儿园')
    Department.create(:number => '3111',:name => '后勤集团资产财务中心')
    Department.create(:number => '3112',:name => '后勤集团综合办公室')
    Department.create(:number => '3200',:name => '化学化工学院')
    Department.create(:number => '3201',:name => '化学化工学院海洋化学系')
    Department.create(:number => '3202',:name => '化学化工学院海洋化学研究所')
    Department.create(:number => '3203',:name => '化学化工学院化学工程系')
    Department.create(:number => '3204',:name => '化学化工学院化学系')
    Department.create(:number => '3205',:name => '化学化工学院应用化学系')
    Department.create(:number => '3300',:name => '环境科学与工程学院')
    Department.create(:number => '3301',:name => '环境科学与工程学院测试中心')
    Department.create(:number => '3302',:name => '环境科学与工程学院环境工程系')
    Department.create(:number => '3303',:name => '环境科学与工程学院环境科学系')
    Department.create(:number => '3400',:name => '机关事务服务中心')
    Department.create(:number => '3500',:name => '基础教学中心')
    Department.create(:number => '3501',:name => '基础教学中心计算机基础部')
    Department.create(:number => '3502',:name => '基础教学中心教育系')
    Department.create(:number => '3503',:name => '基础教学中心军事教研室')
    Department.create(:number => '3504',:name => '基础教学中心社会科学部')
    Department.create(:number => '3505',:name => '基础教学中心体育系')
    Department.create(:number => '3506',:name => '基础教学中心艺术教育中心')
    Department.create(:number => '3507',:name => '基础教学中心艺术系')
    Department.create(:number => '3600',:name => '基础实验教学中心')
    Department.create(:number => '3700',:name => '纪委、监察审计处')
    Department.create(:number => '3800',:name => '继续教育学院')
    Department.create(:number => '3801',:name => '继续教育学院培训科')
    Department.create(:number => '3900',:name => '教务处')
    Department.create(:number => '3901',:name => '教务处教材科')
    Department.create(:number => '3902',:name => '教务处教室管理科')
    Department.create(:number => '3903',:name => '教务处教学规划与实践教学科')
    Department.create(:number => '3904',:name => '教务处教学运行科')
    Department.create(:number => '3905',:name => '教务处实验实践教学科')
    Department.create(:number => '3906',:name => '教务处学业与学籍管理科')
    Department.create(:number => '3907',:name => '教务处招生工作办公室')
    Department.create(:number => '4000',:name => '经济学院')
    Department.create(:number => '4001',:name => '经济学院国际经济贸易系')
    Department.create(:number => '4002',:name => '经济学院金融系')
    Department.create(:number => '4003',:name => '经济学院经济学系')
    Department.create(:number => '4100',:name => '科学技术处')
    Department.create(:number => '4101',:name => '科学技术处成果与知识产权科')
    Department.create(:number => '4102',:name => '科学技术处技术开发科')
    Department.create(:number => '4103',:name => '科学技术处军事工程办公室')
    Department.create(:number => '4104',:name => '科学技术处重大科技专项办公室')
    Department.create(:number => '4105',:name => '科学技术处综合科')
    Department.create(:number => '4200',:name => '控股公司')
    Department.create(:number => '4201',:name => '控股公司储蓄所')
    Department.create(:number => '4202',:name => '控股公司工程勘察设计开发院')
    Department.create(:number => '4203',:name => '控股公司工业水回用技术研究所（兰德环境公司）')
    Department.create(:number => '4204',:name => '控股公司海洋仪器厂')
    Department.create(:number => '4205',:name => '控股公司华海制药厂')
    Department.create(:number => '4206',:name => '控股公司建设监理公司')
    Department.create(:number => '4207',:name => '控股公司科技公司')
    Department.create(:number => '4208',:name => '控股公司实业开发总公司')
    Department.create(:number => '4209',:name => '控股公司学术交流中心')
    Department.create(:number => '4210',:name => '控股公司印刷厂')
    Department.create(:number => '4211',:name => '控股公司制冷设备厂')
    Department.create(:number => '4212',:name => '控股公司咨询开发公司')
    Department.create(:number => '4300',:name => '离退休干部工作处')
    Department.create(:number => '4400',:name => '青岛学院')
    Department.create(:number => '4500',:name => '人才交流中心')
    Department.create(:number => '4600',:name => '人才交流中心人才交流中心（二）')
    Department.create(:number => '4700',:name => '人事处')
    Department.create(:number => '4701',:name => '人事处劳资科')
    Department.create(:number => '4702',:name => '人事处人才交流中心')
    Department.create(:number => '4703',:name => '人事处人事档案科')
    Department.create(:number => '4704',:name => '人事处人事科')
    Department.create(:number => '4705',:name => '人事处师资管理办公室')
    Department.create(:number => '4706',:name => '人事处综合科')
    Department.create(:number => '4800',:name => '人文社会科学研究院')
    Department.create(:number => '4900',:name => '实验室与设备管理处')
    Department.create(:number => '4901',:name => '实验室与设备管理处设备科')
    Department.create(:number => '5000',:name => '食品科学与工程学院')
    Department.create(:number => '5100',:name => '数学科学学院')
    Department.create(:number => '5101',:name => '数学科学学院大学数学教研中心')
    Department.create(:number => '5102',:name => '数学科学学院数学系')
    Department.create(:number => '5103',:name => '数学科学学院数学研究所')
    Department.create(:number => '5104',:name => '数学科学学院信息与计算科学系')
    Department.create(:number => '5200',:name => '水产学院')
    Department.create(:number => '5201',:name => '水产学院海洋渔业系')
    Department.create(:number => '5202',:name => '水产学院水产养殖系')
    Department.create(:number => '5300',:name => '图书馆')
    Department.create(:number => '5301',:name => '图书馆采编部')
    Department.create(:number => '5302',:name => '图书馆流通部（二）')
    Department.create(:number => '5303',:name => '图书馆信息中心')
    Department.create(:number => '5304',:name => '图书馆阅览部（二）')
    Department.create(:number => '5305',:name => '图书馆阅览部（一）')
    Department.create(:number => '5306',:name => '图书馆赠书办公室')
    Department.create(:number => '5400',:name => '团委')
    Department.create(:number => '5500',:name => '外国语学院')
    Department.create(:number => '5501',:name => '外国语学院朝鲜语系')
    Department.create(:number => '5502',:name => '外国语学院电教室')
    Department.create(:number => '5503',:name => '外国语学院日语系')
    Department.create(:number => '5504',:name => '外国语学院西语系')
    Department.create(:number => '5505',:name => '外国语学院英语二系')
    Department.create(:number => '5506',:name => '外国语学院英语二系')
    Department.create(:number => '5507',:name => '外国语学院英语系')
    Department.create(:number => '5600',:name => '网络中心')
    Department.create(:number => '5700',:name => '文科处')
    Department.create(:number => '5800',:name => '文学与新闻传播学院')
    Department.create(:number => '5801',:name => '文学与新闻传播学院海洋文化研究所')
    Department.create(:number => '5802',:name => '文学与新闻传播学院汉学系')
    Department.create(:number => '5803',:name => '文学与新闻传播学院王蒙文学研究所')
    Department.create(:number => '5804',:name => '文学与新闻传播学院文化产业系')
    Department.create(:number => '5805',:name => '文学与新闻传播学院新闻与传播系')
    Department.create(:number => '5806',:name => '文学与新闻传播学院中文系')
    Department.create(:number => '5900',:name => '校友总会')
    Department.create(:number => '6000',:name => '新闻中心')
    Department.create(:number => '6100',:name => '新校建设指挥部')
    Department.create(:number => '6101',:name => '新校建设指挥部工程部')
    Department.create(:number => '6200',:name => '信息科学与工程学院')
    Department.create(:number => '6201',:name => '信息科学与工程学院电子工程系')
    Department.create(:number => '6202',:name => '信息科学与工程学院海洋技术系')
    Department.create(:number => '6203',:name => '信息科学与工程学院海洋遥感研究所')
    Department.create(:number => '6204',:name => '信息科学与工程学院计算机科学系')
    Department.create(:number => '6205',:name => '信息科学与工程学院物理系')
    Department.create(:number => '6300',:name => '学报编辑部')
    Department.create(:number => '6400',:name => '学生处、武装部')
    Department.create(:number => '6500',:name => '研究生教育中心')
    Department.create(:number => '6501',:name => '研究生教育中心管理部')
    Department.create(:number => '6502',:name => '研究生教育中心考试办公室')
    Department.create(:number => '6503',:name => '研究生教育中心培养部')
    Department.create(:number => '6504',:name => '研究生教育中心培养部')
    Department.create(:number => '6505',:name => '研究生教育中心学位办')
    Department.create(:number => '6600',:name => '医药学院')
    Department.create(:number => '6700',:name => '招投标管理中心')

  end

  def self.down
    drop_table :departments
  end
end
